import javax.swing.*;

public class OptionPaneTest extends JFrame {

	public OptionPaneTest() {
		setVisible(true);
		setSize(300, 300);
		JOptionPane.showConfirmDialog(this, 
				"Do you want to save it?",        
				"Confirmation Message", 
				JOptionPane.YES_NO_CANCEL_OPTION,
				JOptionPane.WARNING_MESSAGE);     
		}

	public static void main(String[] args) {
		OptionPaneTest op = new OptionPaneTest();

	}

}
